CREATE TABLE [dbo].[DemoTaskTasks_ContactContacts]
(
[Contacts] [uniqueidentifier] NULL,
[Tasks] [uniqueidentifier] NULL,
[OID] [uniqueidentifier] NOT NULL ROWGUIDCOL,
[OptimisticLockField] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DemoTaskTasks_ContactContacts] ADD CONSTRAINT [PK_DemoTaskTasks_ContactContacts] PRIMARY KEY CLUSTERED  ([OID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iContacts_DemoTaskTasks_ContactContacts] ON [dbo].[DemoTaskTasks_ContactContacts] ([Contacts]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [iContactsTasks_DemoTaskTasks_ContactContacts] ON [dbo].[DemoTaskTasks_ContactContacts] ([Contacts], [Tasks]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iTasks_DemoTaskTasks_ContactContacts] ON [dbo].[DemoTaskTasks_ContactContacts] ([Tasks]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DemoTaskTasks_ContactContacts] WITH NOCHECK ADD CONSTRAINT [FK_DemoTaskTasks_ContactContacts_Contacts] FOREIGN KEY ([Contacts]) REFERENCES [dbo].[Contact] ([Oid]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[DemoTaskTasks_ContactContacts] WITH NOCHECK ADD CONSTRAINT [FK_DemoTaskTasks_ContactContacts_Tasks] FOREIGN KEY ([Tasks]) REFERENCES [dbo].[DemoTask] ([Oid]) NOT FOR REPLICATION
GO
